#!/usr/bin/env python
#coding=utf-8 


class HotelRoomCalc(object):
	'Hotel room rate calculator'
	def __init__(self, rt, sales=0.085, rm=0.1): # 租房费用  销售税   房间税
		""" HotelRoomCalc default arguments:
			sales tax == 8.5% and room tax == 10%"""
		self.salesTax = sales
		self.roomTax = rm
		self.roomRate = rt

	def calcTotal(self, days=1):
		'Calculate total; default to daily rate'
		daily = round((self.roomRate * 
			(1+self.roomTax + self.salesTax)), 2)
		return float(days) * daily

sfo = HotelRoomCalc(299)  # 旧金山
print sfo.calcTotal()  # 如租金
sfo.calcTotal(2)

sea = HotelRoomCalc(189, 0.086, 0.058) # 新的实例
sea.calcTotal()
sea.calcTotal(4)

# 类属性如果可变的话，那么就会


